package com.school.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;

import com.school.mapper.FileMapper;
import com.school.pojo.File;
import com.school.pojo.Student;
import com.school.pojo.Teacher;
import com.school.service.FileService;

@Service
@Transactional
public class FileServiceImpl implements FileService{
	
	@Autowired
	private FileMapper fileMapper;
	
	@Override
	public int upload(File url) {
		// TODO Auto-generated method stub
		return fileMapper.upload(url);
	}

	@Override
	public File findbyId(Integer file_id) {
		// TODO Auto-generated method stub
		return fileMapper.findbyId(file_id);
	}

	@Override
	public int edit(Teacher t) {
		// TODO Auto-generated method stub
		return fileMapper.edit(t);
	}

	@Override
	public int edit(Student t) {
		// TODO Auto-generated method stub
		return fileMapper.edits(t);
	}


}
